package io;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.util.Scanner;

public class TestNOte {
    public static void main(String[] args) throws IOException {
        FileOutputStream fos =new FileOutputStream("note.txt");
        Scanner scanner=new Scanner(System.in);

       while (true){
           String line=scanner.nextLine();
           if ("exit".equals(line)){
               break;
           }
           fos.write(line.getBytes(StandardCharsets.UTF_8));
       }
        System.out.println("没话了");
       fos.close();


    }
}
